package com.lvy.hczn.front.system.domain.business;

import com.baomidou.mybatisplus.annotation.TableName;
import com.lvy.hczn.front.common.core.domain.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * 上下架指令历史记录
 *
 * @author yw
 * @date 2022-03-18 19:43:26
 **/
@Data
@TableName("up_or_down_policy_history")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "上下架指令历史记录")
public class UpOrDownPolicyHistory extends BaseModel<UpOrDownPolicyHistory> {

    @ApiModelProperty(value = "货箱编号")
    private String boxCode;

    @ApiModelProperty(value = "货箱类型:0空箱，1原料箱，2订单箱,")
    private String boxType;

    @ApiModelProperty(value = "客户端,可理解为出入库操作员ID，做socketIo消息派发,对应wcs的ID_Num")
    private String clientId;

    @ApiModelProperty(value = "操作台")
    private String consoleId;

    @ApiModelProperty(value = "分拣称重时产品")
    private String spuId;

    @ApiModelProperty(value = "分拣称重时剩余重量")
    private BigDecimal totalWeight;

    @ApiModelProperty(value = "分拣重量")
    private BigDecimal sortWeight;

    @ApiModelProperty(value = "体积")
    private BigDecimal volume;

    @ApiModelProperty(value = "类型(UP/DOWN)")
    private String type;

    @ApiModelProperty(value = "流程状态,wcs与wms交互跟踪，根据流程状态，可做相应处理及判断流程异常位置，" +
            "1、发送出库指令；2、wcs响应指令；3、货箱离开库位；4、货箱离开库位响应；5、出库到达缓存位；6、出库到位wms响应；" +
            "7、货箱不入库；8、货箱不入库响应；9、出库时货箱入库；10、出库时货箱入库响应；11、发送入库指令；12、货箱入库响应；" +
            "13、货箱入库完成；14、货箱入库完成响应；15、强制入库；16、强制入库响应；17、发送称重指令；" +
            "18、称重响应；19、货箱毛重称重；20、货箱毛重称重响应；21、货箱毛重重量响应（货箱放到缓存位称重后的响应）；0、流程异常的数据；")
    private Integer processState;

    @ApiModelProperty(value = "流程类型：0、客户取货出库；1、分拣/生产出库到缓存位；2、称重；3、入库；4、强制入库；5、货箱毛重称重；6、分拣的订单箱入库；7、采购入库称重")
    private Integer processType;

    @ApiModelProperty(value = "传入wcs的箱子状态位，如原材料入库时:dataState=2^9")
    private Integer dataState;

    @ApiModelProperty(value = "上架开始位置")
    private Integer upFromLocation;

    @ApiModelProperty(value = "下架到达位置")
    private Integer downToLocation;

    @ApiModelProperty(value = "出库单")
    private String outboundOrderCode;

    @ApiModelProperty(value = "提货单/取货单")
    private String deliveryOrderCode;

    @ApiModelProperty(value = "入库单ID")
    private String warehousingEntryId;

    @ApiModelProperty(value = "传入wcs的下架的批次编号（下架的货箱编号，一次性传入wcs，如：分拣，出库），wcs可根据takeNum处理优先级")
    private String takeNum;

    @ApiModelProperty(value = "状态：0、正常；1、异常")
    private Integer status;

    @ApiModelProperty(value = "wcs是否响应，0、否；1、是，wcs获取数据时，好像是暂停接收数据还是什么的，造成未响应，暂时由wms过一分钟重发，后续迭代由node-red通讯做处理")
    private boolean response;

    @ApiModelProperty(value = "是否wcs按钮触发上架，0：分拣页面按按钮入库，1：按wcs按钮入库")
    private boolean upByButton;
}